﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.views.components.mainmenu {
    import flash.events.*;
    import reprise.controls.*;
    import net.wooga.pets.events.*;

    public class VisitFriendsPanel extends SimpleButton {

        private var m_visitorXpLevel:Label;
        private var m_visitorXpPoints:Label;
        private var m_visitorDetails:Label;
        private var m_backButton:LabelButton;

        override public function show(... _args):void{
            addCSSClass("show");
        }
        override public function hide(... _args):void{
            removeCSSClass("show");
        }
        public function cretaeToolTip(_arg1:String):void{
            setTooltipData(_arg1);
        }
        public function setLabels(_arg1:String, _arg2:String, _arg3:String, _arg4:String):void{
            this.m_visitorXpLevel.setLabel(_arg1);
            this.m_visitorXpPoints.setLabel(_arg2);
            this.m_visitorDetails.setLabel(_arg3);
            this.m_backButton.setLabel(_arg4);
        }
        override protected function initialize():void{
            super.initialize();
            cssID = "visitFriendsPanel";
        }
        override protected function createChildren():void{
            this.m_backButton = LabelButton(addComponent("backButton", null, LabelButton));
            this.m_backButton.addEventListener(MouseEvent.CLICK, this.backButton_click);
            this.m_visitorXpLevel = Label(addComponent("xpLevelLabel", null, Label));
            this.m_visitorXpPoints = Label(addComponent("xpPointsLabel", null, Label));
            this.m_visitorDetails = Label(addComponent("friendNameLabel", null, Label));
        }
        private function backButton_click(_arg1:MouseEvent):void{
            dispatchEvent(new ViewCompEvent(ViewCompEvent.CLICK, "backButton"));
        }

    }
}//package net.wooga.pets.views.components.mainmenu 
